package com.queen.restaurant.dao;

import java.util.List;

import org.springframework.stereotype.Repository;

import com.queen.restaurant.domain.User;

@Repository
public class UserDao extends BaseDao<User>{
	
	public User getUserByName(String username){
		User user = null;
		String hql = "from User user where user.userName=?";
		List<User> userList = getHibernateTemplate().find(hql,username);
		if (userList.size() > 0) {
			user = userList.get(0);
		}
		return user;
	}
	
}
